from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.views.decorators.csrf import ensure_csrf_cookie
from django.shortcuts import HttpResponse, Http404, render
from django.core.handlers.wsgi import WSGIRequest
from django.views.decorators.http import require_GET

# from hte.error.handle import error_page
from hte.error.models import HTEError
# from apps.account.models.users import UserRole
# from apps.analytics.tasks import on_view


# Create your views here.

@login_required
def add_image(req):
    action = req.GET.get('action')
    tid = req.GET.get('tid')
    return render(req, 'imagerecognize/image.html',
                  {'tid': tid,
                   'action': action})
    # return render(req, 'storage/template.html')
